﻿<%@ Page Title="用户管理" Language="C#" MasterPageFile="~/Admin/layout.master" AutoEventWireup="true"
    CodeBehind="Users.aspx.cs" Inherits="Sunimage.Spjg.Web.Admin.Sys.Users" %>

<%@ Import Namespace="Sunimage.Spjg.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href='<%=ResolveUrl("~/Themes/Default/Admin/Users.css") %>' type="text/css"
        rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphWorkspace" runat="server">
    <div class="ToolPanel">
        <%--<div style="float: right;">
            用户名<asp:TextBox ID="tbxUsernameSrch" runat="server"></asp:TextBox>
            姓名<asp:TextBox ID="tbxNameSrch" runat="server"></asp:TextBox>
            <asp:Button ID="btnSearch" runat="server" Text="查找" OnClick="btnSearch_Click" />
        </div>--%>
        <%--<div style="float: right;">
            <uc:AjaxLoading ID="AjaxLoading1" runat="server" />
        </div>--%>
        <span style="margin: 0 20px;">
            <%--<asp:Button ID="btnNew" runat="server" Text="添加用户" ToolTip="添加一个新的所片用户" />--%>
            <a href="UsersAdd.aspx">添加用户</a> </span><span>默认密码：888888</span>
    </div>
    <div class="DataPanel">
        <asp:GridView ID="gvUsers" Width="100%" AutoGenerateColumns="false" runat="server"
            SkinID="List" DataKeyNames="ID" AllowPaging="true" PageSize="20" OnRowCommand="gvUsers_RowCommand"
            OnRowDataBound="gvUsers_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="No.">
                    <ItemStyle CssClass="listNo" />
                    <ItemTemplate>
                        <asp:Literal ID="LtrNo" runat="server"></asp:Literal></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="用户名">
                    <ItemTemplate>
                        <%# Eval("UserName")%>
                    </ItemTemplate>
                    <ItemStyle CssClass="UserName" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="昵称">
                    <ItemTemplate>
                        <%# Eval("NickName")%>
                    </ItemTemplate>
                    <ItemStyle CssClass="NickName" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Email">
                    <ItemTemplate>
                        <%# Eval("Email")%>
                    </ItemTemplate>
                    <ItemStyle CssClass="Email" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="上次登录">
                    <ItemTemplate>
                        <%# Eval("LastLogin")%>
                    </ItemTemplate>
                    <ItemStyle CssClass="LastLogin" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="用户类型">
                    <ItemTemplate>
                        <asp:Label ID="lblRoleName" runat="server" Text="Label"></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="RealName" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="恢复密码">
                    <ItemTemplate>
                        <asp:ImageButton ID="lbtnReset" OnClientClick="return confirm('确定要重置本用户的密码吗?');"
                            runat="server" ToolTip="恢复密码" ImageUrl="~/Themes/Default/images/reset.gif" CommandName="ResetPwd"
                            CommandArgument='<%#Eval("Id") %>'></asp:ImageButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="resetPwd" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="&#160;">
                    <ItemTemplate>
                        <asp:ImageButton ID="lbtnEdit" runat="server" SkinID="ListEdit" ToolTip="修改用户信息"
                            CommandName="EditUser" CommandArgument='<%#Eval("Id") %>'></asp:ImageButton>
                        <asp:ImageButton ID="lbtnDel" OnClientClick="return confirm('确定要删除本用户吗?');" runat="server"
                            SkinID="ListDelete" CommandName="DeleteUser" CommandArgument='<%#Eval("Id") %>'>
                        </asp:ImageButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="listOp" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="PagerPanel">
        <webdiyer:AspNetPager ID="pager" runat="server" ShowPageIndexBox="Always" PageIndexBoxType="DropDownList"
            CssClass="paginator" CurrentPageButtonClass="cpb" TextBeforePageIndexBox="Page: "
            HorizontalAlign="Justify" PageSize="20" AlwaysShow="true" OnPageChanged="Pager_PageChanged"
            CustomInfoHTML="共%PageCount%页，共%RecordCount%条数据" ShowCustomInfoSection="Right">
        </webdiyer:AspNetPager>
    </div>
</asp:Content>
